1. Field of the Invention
The present invention relates to a method and apparatus for processing graphic data, and more particularly, to a two-dimensional (2D) graphic acceleration method and apparatus which can reduce the computational complexity of graphic processing data.
2. Description of the Related Art
Graphic data is processed using one of various methods in a windows operating system. There are a variety of types of Windows operating systems but Windows CE is more frequently used in a personal digital assistant (PDA) or a small-sized computer. Windows CE version 4.0 and the latest version 4.1 (WinCE.NET) are part of windows embedded operating system. When two-dimensional (2D) graphic data is processed in WinCE.NET, a graphic device driver receives a raster operation code from the WinCE and processes the 2D graphic data as instructed in the raster operation code. A 2D graphic accelerator is designed to process raster operation codes, which are commonly used or inefficient to be processed by software, by hardware. Graphic processing as defined in a raster operation code can also be performed in a window operating system other than WinCE.
When processing 2D graphic data, graphic data is expressed with the number of bits per pixel (bpp) of data. For instance, graphic data can be expressed as 1 bpp, 4 bpp, 8 bpp, 16 bpp, 24 bpp, or 32 bpp. Here, 1 bpp indicates that a pixel of data is expressed with 1bit and one pixel has at most 2 distinct colors, i.e., black and white. That is, graphic data of 1 bpp can be expressed only in black and white. In the same way, 4 bpp indicates that a pixel of data is expressed with 4 bits and one pixel has at most 16 distinct colors, while 8 bpp indicates that a pixel of data is expressed with 8 bits and one pixel has at most 256 distinct colors. In general, graphic processors use color graphic data of 8 bpp or more, and graphic data, which is transmitted together with a raster operation code, is aligned in units of bytes in a window operating system such as WinCE. Therefore, in the case of continuous pixels of 8 bpp or more, it is complicated to address a memory in which these pixels are stored when performing a raster operation on these pixels. For instance, when performing a negative SRCCOPY raster operation on byte-aligned pixel data, very complicated control operations are required to address a memory area in which the pixel data is stored.